package com.sky.loveshop.api;

import com.sky.loveshop.entity.collectMoney.ActivateResponse;
import com.sky.loveshop.entity.collectMoney.CmPreCreateResponse;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author xcy
 * @version V1.0
 * @description 收钱吧Api
 * @date 2024/9/24 21:47
 */
public interface CollectMoneyApi {

    /**
     * 终端激活
     * @param  code: 激活码
     * @param  vendor_sn: 服务商序列号
     * @param  vendor_key: 服务商密钥
     * @param  app_id: 应用编号
     * @return  {terminal_sn:"$终端号",terminal_key:"$终端密钥"}
     */
    @RequestLine("POST /terminal/activate")
    @Headers({"Content-Type: application/json", "Authorization: {token}"})
    ActivateResponse terminalActivate(@RequestBody CollectMoneyOrder.ActivateRequest request, @Param("token") String token);

    /**
     * 预下单
     */
    @RequestLine("POST /upay/v2/precreate")
    @Headers({"Content-Type: application/json", "Authorization: {token}"})
    CmPreCreateResponse preCreateOrder(@RequestBody CollectMoneyOrder.PreCreateRequest request, @Param("token") String token);

    //@RequestLine("POST /order/create")
    //@Headers({"Content-Type: application/json"})
    //MtOrderCreateResponse createOrder(@RequestBody Order.CreateOrderRequest request);
    //
    //@RequestLine("POST /order/list")
    //@Headers({"Content-Type: application/json"})
    //MtOrderPullResponse pullOrderList(@RequestBody Order.PullOrderRequest request);
    //
    //@RequestLine("POST /deliver/records/{platform_order_id}")
    //@Headers({"Content-Type: application/json"})
    //MtOrderPullDeliverRecordsResponse pullDeliverRecords(@Param("platform_order_id") String platformOrderId, @RequestBody Order.PullDeliverRecordsRequest request);

}
